#define _CRT_SECURE_NO_WARNINGS
#pragma warning(disable:6031)

#include <stdio.h>
#include<stdlib.h>
double RAND(double L, double R)
  {
     return L + (R - L) * rand() * 1.0 / RAND_MAX;
 }
int main(){
	int seed,i;
	scanf("%d",&seed);
	srand(seed);
	int a=0,b=0;
	int n;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		b+=1;
		float x=RAND(1,2);
		float y=RAND(0,1);
//		printf("%lf %lf ",x,y);
	double fx=1.0/x;
		if(x<=2.0&&x>=1.0&&y<=fx&&y>=0.0)
		{
			a+=1;
		}
	}
	double m=1.0*a/b;
	//printf("%d %d",a,b);
	printf("%llf",m);
}